package com.tidc.commonality.fallbackFactory;

import com.tidc.commonality.api.AuthenticationApi;

import feign.hystrix.FallbackFactory;

/**
 * @ClassNmae AuthenticationFallback
 * @Description TODO
 * @Author 冯涛滔
 **/
public class AuthenticationFallback implements FallbackFactory<AuthenticationApi> {
	@Override
	public AuthenticationApi create(Throwable throwable) {
		return new AuthenticationApi() {
			@Override
			public Object login(String username, String password, String client_id, String client_secret, String grant_type) {
				return "登录失败";
			}

			@Override
			public Object userInfo(String access_token) {
				return null;
			}

			@Override
			public int hashCode() {
				return super.hashCode();
			}
		};
	}
}
